
// 这里定义侧边栏和路由
// 如果不需要在侧边栏展示的路由可以在router.js上配置
// id 可选，请确保唯一，用于定位当前路由选中和展开侧边栏
// path 路径，必须，旧页面路由请统一以/old/开头
// label 展示文案，必须
// icon 可选，字符串或者 { color: '#6CB5FE', class: 'fa fa-folder' }
// hide 侧边栏是否隐藏
// wants 需要权限列表数组，可选
// isGroup 是否是组
// component 组件，可选
// children 子级
export default [
  { id: 'dashboard', path: '/', label: 'Dashboard', icon: 'fa fa-tachometer' },
  {
    id: 'pages',
    label: 'Pages',
    icon: { color: '#2866CF', class: 'fa fa-code' },
    path: '/page',
    component: () => import('../pages/Demo/Index.vue'),
    children: [
      { id: 'page-1', path: '/page/page1', label: 'Page 1', component: () => import('../pages/Demo/Page1.vue'), icon: { color: '#36AFEA', class: 'fa fa-circle' } },
      { id: 'page-2', path: '/page/page2', label: 'Page 2', component: () => import('../pages/Demo/Page2.vue'), icon: { color: '#8151AF', class: 'fa fa-circle' } },
      { id: 'page-3', path: '/page/page3', label: 'Page 3', component: () => import('../pages/Demo/Page3.vue'), icon: { color: '#41B883', class: 'fa fa-circle' } },
      { id: 'page-4', hide: true, path: '/page/page4', label: 'Page 4', component: () => import('../pages/Demo/Page4.vue'), icon: { color: '#2866CF', class: 'fa fa-circle' } }
    ]
  },
  { label: 'Design', icon: { color: '#EF8965', class: 'fa fa-paint-brush' } },
  { label: 'Engineering', icon: { color: '#2866CF', class: 'fa fa-code' } },
  { label: 'Databases', icon: { color: '#ED404B', class: 'fa fa-database' } },
  { label: 'Servers', icon: { color: '#5ECC8A', class: 'fa fa-server' } },
  { label: 'Backend', icon: { color: '#2866CF', class: 'fa fa-circle' } },
  { label: 'Frontend', icon: { color: '#5ECC8A', class: 'fa fa-circle' } },
  { label: 'Vue', children: [], icon: { color: '#6CB5FE', class: 'fa fa-folder' } },
  { label: 'React', children: [], icon: { color: '#6CB5FE', class: 'fa fa-folder' } },
  { label: 'Angular', children: [], icon: { color: '#6CB5FE', class: 'fa fa-folder' } },
  { path: '/login', label: 'Sigin In', icon: 'fa fa-sign-in' },
  { 
    label: 'User',
    icon: 'fa fa-user',
    children: [
      { path: '/user/list', label: 'User List', icon: 'fa fa-user-o', component: () => import('../pages/Demo/Page1.vue'), guard: 'admin' },
      { path: '/user/detail', label: 'User Detail', hide: true, component: () => import('../pages/Demo/Page1.vue'), guard: 'admin' },
      { path: '/user/profile', label: 'User Profile', hide: true, component: () => import('../pages/Demo/Page1.vue'), guard: 'admin' },
      { path: '/user/setting', label: 'User Setting', icon: 'fa fa-user-o', component: () => import('../pages/Demo/Page1.vue'), guard: 'admin' },
    ]
  },
  {
    id: 400,
    label: 'Folder',
    icon: { color: '#6CB5FE', class: 'fa fa-folder' },
    children: [
      {
        label: 'Level 1',
        id: 401,
        children: [
          { label: 'Level 2-1' },
          { label: 'Level 2-2' },
          { label: 'Level 2-3' },
          { id: 402, path: '/level/level-4', label: 'Level 2-4', component: () => import('../pages/Demo/Page1.vue'), icon: { color: '#2866CF', class: 'fa fa-circle' } },
        ],
      },
      { label: 'CAAAA' },
      { label: 'CBBBB' },
      { label: 'CBBBB' },
    ],
  },
  {
    label: 'Group A',
    isGroup: true,
    children: [
      { label: 'A10' },
      { label: 'A11' },
      { label: 'A12' },
    ]
  },
  {
    label: 'Group B',
    isGroup: true,
    children: [
      { label: 'B10' },
      { label: 'B11' },
      { label: 'B12' },
    ]
  }
]
